package com.caiyi.financial.nirvana.sms.service;

import com.caiyi.financial.nirvana.sms.base.service.BaseService;
import com.caiyi.financial.nirvana.sms.entity.SmsReceiveMessage;
import com.caiyi.financial.nirvana.sms.enums.ReturnCodeEnum;
import com.caiyi.financial.nirvana.sms.mapper.SmsReceiveMessageMapper;
import com.caiyi.financial.nirvana.sms.querybean.PageBean;
import com.caiyi.financial.nirvana.sms.querybean.QueryReceiveMessage;
import com.youyu.common.api.Result;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class SmsReceiveMessageService extends BaseService<SmsReceiveMessage> {

    @Autowired
    private SmsReceiveMessageMapper smsReceiveMessageMapper;

    public void insertList(List<SmsReceiveMessage> list) {
        try{
            int res = smsReceiveMessageMapper.insertList(list);
            logger.info("SmsReceiveMessageService insertList size : {} , insert into return {}", list.size(), res);
            if (res != list.size()) {
                logger.error("SmsReceiveMessageService DB Insert Error.");
            }
        } catch (Exception e) {
            logger.error("SmsReceiveMessageService smsReceiveMessageMapper error ", e);
        }
    }

}
